package com.example.user.myhjjf_app.presenter;

import android.util.Log;

import com.example.user.myhjjf_app.R;
import com.example.user.myhjjf_app.model.Model_ptsb;
import com.zhy.adapter.abslistview.ViewHolder;
import com.zhy.adapter.abslistview.base.ItemViewDelegate;

/**
 * Created by User on 2017/8/28.
 */

public class MsgComingItemDelagate implements ItemViewDelegate<Model_ptsb>{
    @Override
    public int getItemViewLayoutId() {
        return R.layout.listitem_ptsb_item;
    }

    @Override
    public boolean isForViewType(Model_ptsb item, int position) {
        return true;
    }

    @Override
    public void convert(ViewHolder holder, Model_ptsb model_ptsb, int position) {
        if (model_ptsb.getConte()!=-1){
            holder.setText(R.id.tv_bm,String.valueOf(model_ptsb.getConte()));
        }

        holder.setText(R.id.tv_name,String.valueOf(model_ptsb.getName()));
    }


}
